  var id = getvl("id"); 
  var sid=getvl("sid");
  var currentPage=1;
	// console.log(getvl('id'),getvl("sid"),currentPage)
 $(function(){
 	    if(id!='' && sid!=''){
 	    	leibiebaens(id,sid,currentPage);
 	    }else{
 	    //	alert("参数有误...");
 	    }
 });
  // "/api/goods/selectgoodsAllag2?current="+currentPage+"&str="+id,
  function leibiebaens(id,sid,currentPage){
		$.ajax({       
			url: urlcore + "/api/goods/selectGoodsList?shopId="+sid+"&sortTypeId="+id+"&current=" +currentPage,
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success: function(data) {
				if(data.success == true) {
				 console.log(data)
					$.each(data.data.list, function(y,n) {
			var qiugou='<div class="public_goods">'+
'				<a href="7.0.0goods_detail.html?id='+n.id+'">'+
'					<dl>'+
'						<dt>'+
'							<img onerror="errorImg(this)" src="'+n.coverUrl+'" />'+
'						</dt>'+
'						<dd>'+
'							<h5>'+n.goodsTitle+'</h5>'+
'							<h6>&yen;'+n.packPrice+'</h6>'+/*&yen;'+n.tradePrice+'- */
'						</dd>'+
'					</dl>'+
'				</a>'+
'			</div>';
            $("#qiugou").append(qiugou);
					});
					
				} else {
					if(data.msg != '空数据') {
						alert(data.msg)
					} else {
						$('#thiscount').text(0);
					}
				}

			},
			error: function() {
				alert("error");
			}
		});
  }
